package com.example.configclient.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Created by yawn on 2017-11-07 15:32
 */
@RestController
public class ConfigController {

    @Autowired
    private Environment environment;

    @GetMapping("/name")
    public String get() {
        return environment.getProperty("app.user.name");
    }
}
